using System.Configuration;
using System.Reflection;

namespace DALFactory
{
    public class GetDatabaseType
    {
        public IDataAccessObject GetDatabase()
        {
            string strAssemblyName = ConfigurationManager.AppSettings["AssemblyName"];
            string strConstractor = ConfigurationManager.AppSettings["Constractor"];
            Assembly assembly = Assembly.Load(strAssemblyName);
            return (IDataAccessObject)assembly.CreateInstance(strConstractor, false);
        }
    }
}
